package com.gs.study.cfg;

import javax.sql.DataSource;

import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;

/** 
 * @author gaoshang 
 * @date 创建时间：2018年5月17日 下午4:15:55 
 * @version 1.0 
 * @parameter  
 * @since  
 * @return  
 */

public class DataSourceConfig {
/*
    @Bean(name = "titanMasterDS")
    @Primary
    @ConfigurationProperties(prefix = "spring.primary-datasource") // application.properteis中对应属性的前缀
    public DataSource dataSource1() {
        return DataSourceBuilder.create().build();
    }




    @Bean(name = "ds2")
    @Primary
    @ConfigurationProperties(prefix = "spring.secondary-datasource") // application.properteis中对应属性的前缀
    public DataSource dataSource2() {
        return DataSourceBuilder.create().build();
    }*/

}
